<h2>Upcoming reservations</h2>

<% start_date = 1.days.ago %>
<ul>
<% @reservations.each do |res| %>
<% title = res.start_date.strftime('%a, %d %b %Y') %>
<% if start_date != nil and title != start_date.strftime('%a, %d %b %Y') -%>
    <h2><%= title %></h2>
    <% start_date = res.start_date -%>
<% end -%>

    <li><%= view_reservation(res) %></li>
<% end %>
</ul>